﻿using System;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
using System.Text;
using ZhimeiSoft.Framework.Client.Base;
using ZhimeiSoft.Framework.Common.RefectUtils;

namespace ZhimeiSoft.CharmManager.Client.App
{
    public class CharmManagerApp : ClientAppBase
    {
        public CharmManagerApp()
        {
        }

        public override ILoginForm CreateLoginForm()
        {
            ILoginForm loginForm;
            Assembly assembly = typeof(ILoginForm).Assembly;
            loginForm = (ILoginForm)ReflectHelper.Instance.CreateObject(assembly,
                            @"ZhimeiSoft.CharmManager.Client.Forms",
                            @"ZhimeiSoft.CharmManager.Client.Forms.frmLogin",
                            new object[] { });
            return loginForm;
        }

        public override IMainForm CreateMainForm()
        {
            IMainForm mainForm;
            Assembly assembly = typeof(IMainForm).Assembly;
            mainForm = (IMainForm)ReflectHelper.Instance.CreateObject(assembly,
                @"ZhimeiSoft.CharmManager.Client.Forms",
                @"ZhimeiSoft.CharmManager.Client.Forms.frmMain",
                new object[] { });
            return mainForm;
        }

        public override IAboutForm CreateAboutForm()
        {
            return base.CreateAboutForm();
        }

        public override IChangePasswordForm CreateChangePasswordForm()
        {
            return base.CreateChangePasswordForm();
        }
    }
}
